mat-select css width

51

<mat-select 
    panelClass="width-mat" 
    disableOptionCentering
    disableRipple>
    <mat-option *ngFor="let option of elements" value={{option}}>
              {{option}
    </mat-option>
</mat-select>
.mat-select-value {
    text-align: center;
    padding-left: 5px;
}

.width-mat {
    width: 30px;
    font-size: inherit;
    line-height: 2em;
    height: unset;
}

.mat-select-panel .mat-option {
    font-size  : inherit;
    line-height: 1em;
    height     : unset;
    white-space: unset;
}

Comments

Submit
0 Comments